{extend name="public/admin_public"} {block name="content"}
<div class="mdui-m-a-1 mdui-typo mdui-table-fluid">

    <h1 class="mdui-m-l-3">用户组管理</h1>
    <table class="mdui-table mdui-textfield mdui-table-hoverable">
        <thead>
            <tr>
                <th>#</th>
                <th>用户组昵称</th>
                <th>用户组权限</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {volist name="groupData" id="vo"}
            <tr>
                <td>{$vo.gid}</td>
                <td>{$vo.groupName}</td>
                <td>{$vo.rules}</td>
                <td>
                    <div class="mdui-btn-group">
                        <a href="">
                            <button type="button" class="mdui-btn">
                                <i class="mdui-icon material-icons">create</i>
                                编辑
                            </button>
                        </a>
                        <a href="">
                            <button type="button" class="mdui-btn">
                                <i class="mdui-icon material-icons">delete</i>
                                删除
                            </button>
                        </a>
                    </div>
                </td>
            </tr>
            {/volist}
        </tbody>
    </table>

</div>

{/block} {block name="js"}
<script>
    var $$ = mdui.JQ,
        data = '';;

    $$('#user').addClass('mdui-collapse-item-open');
    $$('#setUserGroup').addClass('mdui-list-item-active');

    $$('#submit').on('click', function () {
        data = $$('form').serialize();

        $$.ajax({
            method: 'post',
            url: '',
            data: data,
            dataType: 'json',
            success: function (res) {
                if (res.code == 0) {
                    mdui.snackbar(res.message, {
                        timeout: 2000,
                        position: 'top'
                    })
                } else {
                    mdui.snackbar(res.message, {
                        timeout: 2000,
                        position: 'top'
                    })
                }

            }
        })

        return false;
    })
</script> {/block}